<h1><g:message code="user.login.registration"/></h1>

<g:hasErrors bean="${user}">
<div class="errors">
	<g:renderErrors bean="${user}"></g:renderErrors>
</div> 
</g:hasErrors>

<g:form action="login" name="registerForm">
	<div class="formField">
		<label for="login"><g:message code="user.login.email"/>:</label>
		<g:textField name="email" value="${user?.email}"></g:textField>
	</div>

	<div class="formField"> 
		<label for="password"><g:message code="user.login.password"/>:</label>
		<g:passwordField name="password" value="${user?.password}"></g:passwordField> 
	</div>

	<div class="formField"> 
		<label for="confirm"><g:message code="user.login.confirmPassword"/>:</label>
		<g:passwordField name="confirm" value="${params?.confirm}"></g:passwordField> 
	</div>
	
	<g:hiddenField name="type" value="register"/>
	<g:submitButton class="formButton" name="register" value="${message(code:'user.login.registration')}"></g:submitButton> 
</g:form>

<h1>Login</h1>

<g:hasErrors bean="${loginUser}">
<div class="errors">
	<g:renderErrors bean="${loginUser}"></g:renderErrors>
</div> 
</g:hasErrors>

<g:form action="login" name="registerForm">
	<div class="formField">
		<label for="login"><g:message code="user.login.email"/>:</label>
		<g:textField name="email" value="${loginUser?.email}"></g:textField>
	</div>

	<div class="formField"> 
		<label for="password"><g:message code="user.login.password"/>:</label>
		<g:passwordField name="password" value="${loginUser?.password}"></g:passwordField> 
	</div>

	<g:hiddenField name="type" value="login"/>
	<g:submitButton class="formButton" name="register" value="${message(code:'user.login.login')}"></g:submitButton> 
</g:form>